package org.saxion.concurrency

import scala.actors.Actor
import scala.actors.Actor._
import java.util.ArrayList

abstract class Message
case object AskForMeeting extends Message
case class CustomerMeeting(cus: ArrayList[Actor]) extends Message
case class DeveloperMeeting(dev: ArrayList[Actor]) extends Message
case object BeginMeeting extends Message
case class EndMeeting(clearCustomerList: Boolean) extends Message
case object CastAway extends Message
case object GoBackToWork extends Message
case object WaitForMeeting extends Message
case class Test(test: Boolean) extends Message

object Apl extends App {
  val projectLeader = new ProjectLeader();
  val secretary = new Secretary(projectLeader);
  val customer = new Customer(secretary, "c1");
  val customer2 = new Customer(secretary, "c2");
  val customer3 = new Customer(secretary, "c3");
  val developer = new Developer(secretary, "d1");
  val developer1 = new Developer(secretary, "d2");
  val developer2 = new Developer(secretary, "d3");
  val developer3 = new Developer(secretary, "d4");
  val developer4 = new Developer(secretary, "d5");
  val developer5 = new Developer(secretary, "d6");
  val developer6 = new Developer(secretary, "d7");

  projectLeader.start;
  secretary.start;
  customer.start;
  customer2.start;
  customer3.start;
  developer.start;
  developer1.start;
  developer2.start;
  developer3.start;
  developer4.start;
  developer5.start;
  developer6.start;

}